import request from '@/utils/request'

export function pageInfo(params) {
    return request({
      url: '/sms/dept/page',
      method: 'get',
      params
    })
  }

  export function deptInfo(id) {
    return request({
      url: '/sms/dept/info',
      method: 'get',
      params: {id}
    })
  }

  export function parentList() {
    return request({
      url: '/sms/dept/parent',
      method: 'get'
    })
  }

  export function deptAdd(data) {
    return request({
      url: '/sms/dept/add',
      method: 'post',
      data
    })
  }

  export function deptUpdate(data) {
    return request({
      url: '/sms/dept/update',
      method: 'post',
      data
    })
  }

  export function delteBatch(data) {
    return request({
      url: '/sms/dept/deleteBatch',
      method: 'post',
      data
    })
  }

  export function deptDelete(id) {
    return request({
      url: '/sms/dept/delete',
      method: 'get',
      params: { id }
    })
  }